<template>
  <div class="item2">
    <van-cell title="我的订单" is-link />
    <grid class="grid">
      <template>
        <grid-item class="item" v-for="item in datas" :key="item.id">
          <template #img>
            <img class="img" :src="item.img" alt />
          </template>
          <template #text>
            <p>{{item.text}}</p>
          </template>
        </grid-item>
      </template>
    </grid>
  </div>
</template>

<script>
import Grid from "components/public/grid/Grid";
import GridItem from "components/public/grid/GridItem";
export default {
  name: "Item2",
  data() {
    return {
      datas: {
        item1: {
          id: 1,
          img: require("assets/images/imgs/item2_1.png"),
          text: "签到"
        },
        item2: {
          id: 2,
          img: require("assets/images/imgs/item2_2.png"),
          text: "大姨妈"
        },
        item3: {
          id: 3,
          img: require("assets/images/imgs/item2_3.png"),
          text: "客服"
        },
        item4: {
          id: 4,
          img: require("assets/images/imgs/item2_4.png"),
          text: "达人中心"
        }
      }
    };
  },
  components: {
    Grid,
    GridItem
  }
};
</script>

<style lang="less" scoped>
.item2{
  .van-cell{
    padding-bottom: 0;
  }
  .grid{
    .item{
      flex: 1;
      img{
        width: 24px;
        height: inherit;
      }
    }
  }
}
</style>